<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div id="app"></div>

  <template id="my-app">
    <!-- <button v-on:click="handle">按钮</button>

    <button @click="add">{{count}}</button>

    <div @click="handle" @mouseenter="enter" style="width: 100px;height: 100px;border: 1px solid #000;"></div>

    <div @="{click: handle, mouseenter: enter}" style="width: 100px;height: 100px;border: 1px solid #000;"></div> -->


    <button @click="handleClick($event, '军儿', 18)">按钮</button>

  </template>


  <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
  <script>
    const App = {
      template: '#my-app',
      data() {
        return {
          count: 0
        }
      },
      methods: {
        handleClick(e, name, age) {
          console.log(e, name, age);
        },
        handle() {
          console.log('点了button');
        },
        add() {
          this.count++
        },
        enter() {
          console.log('鼠标移入');
        }
      }
    }

    Vue.createApp(App).mount('#app')
  </script>

</body>
</html>